using System;
using System.Collections.Generic;

namespace PropertyExpression.ControllableQuery.Test
{
    public static class Util
    {
        public static void ForEach<T>(
            this IEnumerable<T> enumerable, Action<T, int> action)
        {
            var index = 0;
            foreach (var item in enumerable)
            {
                action(item, index);
                index++;
            }
        }
    }
}